function out = Energy_W11(u, f, nPhases, nLevels)
global HD
for i = 1 : nPhases
    p{i} = frameDec2(u, nLevels, HD);
end
s = 0;
for i = 1 : nPhases
    for j = 1 : nLevels
        s = s + sum(sum(abs(p{i}{j})));
    end
    s = s + sum(sum(sum(u(:,:,i).*f(:,:,i))));
end
out = s;
end

